package com.joelaws.prototype.client.util;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;

public class Create {

	public static <T> LinkedList<T> newLinkedList() {
		return new LinkedList<T>();
	}

	public static <T> LinkedList<T> newLinkedList(T... data) {
		return new LinkedList<T>(Arrays.asList(data));
	}

	public static <T> LinkedList<T> newLinkedList(Collection<T> collection) {
		return new LinkedList<T>(collection);
	}

	public static <T> List<T> newList() {
		return new ArrayList<T>();
	}

	public static <T> List<T> newList(T... data) {
		return new ArrayList<T>(Arrays.asList(data));
	}

	public static <T> List<T> newList(Collection<T> collection) {
		return new ArrayList<T>(collection);
	}

	public static <K, V> Map<K, V> newMap() {
		return new HashMap<K, V>();
	}

	public static <K, V> Map<K, V> newMap(Map<K, V> map) {
		return new HashMap<K, V>(map);
	}

	public static <T> Set<T> newSet() {
		return new HashSet<T>();
	}

	public static <T> Set<T> newSet(T... data) {
		return new HashSet<T>(Arrays.asList(data));
	}

	public static <T> Set<T> newSet(Collection<T> collection) {
		return new HashSet<T>(collection);
	}
}
